import java.io.*;
public class PointsOnCircle {
   public static void main(String[] args){
	 String a=new String();
	 int n=0;
	 try{
	 BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
	 a=input.readLine();}
	 catch(Exception ex){ex.printStackTrace();}
	 n=Integer.parseInt(a);
	 System.out.println(count(n));
	 System.exit(0);
	 }
   public static long count(int r){
	   int a=1,c=0;
	   long d1=0,d3=0;
	   while(a<=r){
		   if((r%a)==0){
			   c=a%4;
			   if(c==1)d1++;
			   else if(c==3)d3++;
		   }a++;}
	   long result=4*(d1-d3);
	   return result;
   }
}

